﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace JobSearcherAPI.Models
{
    public class SearchArguments
    {
        public string Title { get; set; }
        public string Keywords { get; set; }
        public string Omitted { get; set; }
        public string Location { get; set; }
        public int SearchRadius { get; set; }
        public int DaysOld { get; set; }

        public string Sort { get; set; }
        public string JobType { get; set; }
        public string PublisherID { get; set; }

    }

    public static class ModelExtensions
    {
        public static string UrlEncoded(this string s)
        {
            return HttpUtility.UrlEncode(s);
        }

        public static string UrlDecoded(this string s)
        {
            return HttpUtility.UrlDecode(s);
        }
    }
}
